<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Cafe-Utils | 前端文档</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="shortcut icon" href="/icons/favicon.ico">
    <meta name="description" content="前端文档">
    <meta name="theme-color" content="#3eaf7c">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    
    <link rel="preload" href="/assets/css/0.styles.d3d84be6.css" as="style"><link rel="preload" href="/assets/js/app.7f089e4c.js" as="script"><link rel="preload" href="/assets/js/2.9f5e73e8.js" as="script"><link rel="preload" href="/assets/js/3.2a47c23c.js" as="script"><link rel="preload" href="/assets/js/45.594b749a.js" as="script"><link rel="prefetch" href="/assets/js/10.b5c5700e.js"><link rel="prefetch" href="/assets/js/11.80390338.js"><link rel="prefetch" href="/assets/js/12.f067bd5f.js"><link rel="prefetch" href="/assets/js/13.20c94e2c.js"><link rel="prefetch" href="/assets/js/14.3a03f335.js"><link rel="prefetch" href="/assets/js/15.fc48fa10.js"><link rel="prefetch" href="/assets/js/16.06981385.js"><link rel="prefetch" href="/assets/js/17.9b40465f.js"><link rel="prefetch" href="/assets/js/18.d89ca224.js"><link rel="prefetch" href="/assets/js/19.c6848e16.js"><link rel="prefetch" href="/assets/js/20.a0711b97.js"><link rel="prefetch" href="/assets/js/21.d566ad85.js"><link rel="prefetch" href="/assets/js/22.4901943a.js"><link rel="prefetch" href="/assets/js/23.d6255fa3.js"><link rel="prefetch" href="/assets/js/24.a88ce84e.js"><link rel="prefetch" href="/assets/js/25.19886fd0.js"><link rel="prefetch" href="/assets/js/26.5c944025.js"><link rel="prefetch" href="/assets/js/27.a61fd313.js"><link rel="prefetch" href="/assets/js/28.1e40ebfd.js"><link rel="prefetch" href="/assets/js/29.60c8dbe1.js"><link rel="prefetch" href="/assets/js/30.64963157.js"><link rel="prefetch" href="/assets/js/31.931ea69e.js"><link rel="prefetch" href="/assets/js/32.bce771e5.js"><link rel="prefetch" href="/assets/js/33.e9c7453f.js"><link rel="prefetch" href="/assets/js/34.99c27ee8.js"><link rel="prefetch" href="/assets/js/35.4066b2d3.js"><link rel="prefetch" href="/assets/js/36.fc941c57.js"><link rel="prefetch" href="/assets/js/37.14163d29.js"><link rel="prefetch" href="/assets/js/38.43335765.js"><link rel="prefetch" href="/assets/js/39.156dbace.js"><link rel="prefetch" href="/assets/js/4.6d8feda3.js"><link rel="prefetch" href="/assets/js/40.163bfe43.js"><link rel="prefetch" href="/assets/js/41.df97e701.js"><link rel="prefetch" href="/assets/js/42.9bafe70e.js"><link rel="prefetch" href="/assets/js/43.b86d1037.js"><link rel="prefetch" href="/assets/js/44.fc145987.js"><link rel="prefetch" href="/assets/js/46.b6c8de53.js"><link rel="prefetch" href="/assets/js/47.bb78b392.js"><link rel="prefetch" href="/assets/js/48.3627a180.js"><link rel="prefetch" href="/assets/js/49.bbd39edf.js"><link rel="prefetch" href="/assets/js/5.77776c33.js"><link rel="prefetch" href="/assets/js/50.b68a715f.js"><link rel="prefetch" href="/assets/js/51.bc4475a2.js"><link rel="prefetch" href="/assets/js/6.480ee688.js"><link rel="prefetch" href="/assets/js/7.92c95b3e.js"><link rel="prefetch" href="/assets/js/8.4389b91c.js"><link rel="prefetch" href="/assets/js/9.4470fdec.js">
    <link rel="stylesheet" href="/assets/css/0.styles.d3d84be6.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">前端文档</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="standard Menu" class="dropdown-title"><span class="title">规范</span> <span class="arrow down"></span></button> <button type="button" aria-label="standard Menu" class="mobile-dropdown-title"><span class="title">规范</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/standard/HTML/" class="nav-link">
  HTML编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/CSS/" class="nav-link">
  CSS编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/JavaScript/" class="nav-link">
  JavaScript编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/VUE/" class="nav-link">
  VUE编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/Markdown/" class="nav-link">
  Markdown语法说明
</a></li><li class="dropdown-item"><!----> <a href="/standard/Commit/" class="nav-link">
  Git提交规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/JSON/" class="nav-link">
  JSON数据规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/CopyWriter/" class="nav-link">
  文案风格指南
</a></li></ul></div></div><div class="nav-item"><a href="/desgin/" class="nav-link">
  可视化平台
</a></div><div class="nav-item"><a href="/materiel/" class="nav-link">
  物料
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="plugin Menu" class="dropdown-title"><span class="title">插件</span> <span class="arrow down"></span></button> <button type="button" aria-label="plugin Menu" class="mobile-dropdown-title"><span class="title">插件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/plugin/HRM-Player/" class="nav-link">
  HRM 播放器
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Vue-Flv-Player/" class="nav-link">
  FLV 播放器
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Calendar/" class="nav-link">
  Calendar 农历面板
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Very-Axios/" class="nav-link">
  Very-Axios
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="utils Menu" class="dropdown-title"><span class="title">函数库</span> <span class="arrow down"></span></button> <button type="button" aria-label="utils Menu" class="mobile-dropdown-title"><span class="title">函数库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/utils/Type/" class="nav-link">
  类型判断类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Validator/" class="nav-link">
  常规验证类
</a></li><li class="dropdown-item"><!----> <a href="/utils/String/" class="nav-link">
  字符串类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Array/" class="nav-link">
  数组类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Number/" class="nav-link">
  数字类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Money/" class="nav-link">
  金额类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Date/" class="nav-link">
  日期类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Calculate/" class="nav-link">
  浮点计算类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Tools/" class="nav-link">
  工具类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Storage/" class="nav-link">
  存储类
</a></li><li class="dropdown-item"><!----> <a href="/utils/DOM/" class="nav-link">
  DOM类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Event/" class="nav-link">
  事件处理类
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="tools Menu" class="dropdown-title"><span class="title">工具</span> <span class="arrow down"></span></button> <button type="button" aria-label="tools Menu" class="mobile-dropdown-title"><span class="title">工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tools/NodeJS/" class="nav-link">
  NodeJS
</a></li><li class="dropdown-item"><!----> <a href="/tools/Sourcetree/" class="nav-link">
  Sourcetree
</a></li><li class="dropdown-item"><!----> <a href="/tools/VisualStudioCode/" class="nav-link">
  VSCode
</a></li><li class="dropdown-item"><!----> <a href="/tools/XShell/" class="nav-link">
  XShell
</a></li><li class="dropdown-item"><!----> <a href="/tools/Typora/" class="nav-link">
  Typora
</a></li><li class="dropdown-item"><!----> <a href="/tools/PicGo/" class="nav-link">
  PicGo
</a></li><li class="dropdown-item"><!----> <a href="/tools/XMind/" class="nav-link">
  XMind
</a></li></ul></div></div> <!----></nav> <label title="切换暗色" class="model"><input type="checkbox" hidden="hidden" name="model" id>⚫</label></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="standard Menu" class="dropdown-title"><span class="title">规范</span> <span class="arrow down"></span></button> <button type="button" aria-label="standard Menu" class="mobile-dropdown-title"><span class="title">规范</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/standard/HTML/" class="nav-link">
  HTML编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/CSS/" class="nav-link">
  CSS编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/JavaScript/" class="nav-link">
  JavaScript编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/VUE/" class="nav-link">
  VUE编码规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/Markdown/" class="nav-link">
  Markdown语法说明
</a></li><li class="dropdown-item"><!----> <a href="/standard/Commit/" class="nav-link">
  Git提交规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/JSON/" class="nav-link">
  JSON数据规范
</a></li><li class="dropdown-item"><!----> <a href="/standard/CopyWriter/" class="nav-link">
  文案风格指南
</a></li></ul></div></div><div class="nav-item"><a href="/desgin/" class="nav-link">
  可视化平台
</a></div><div class="nav-item"><a href="/materiel/" class="nav-link">
  物料
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="plugin Menu" class="dropdown-title"><span class="title">插件</span> <span class="arrow down"></span></button> <button type="button" aria-label="plugin Menu" class="mobile-dropdown-title"><span class="title">插件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/plugin/HRM-Player/" class="nav-link">
  HRM 播放器
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Vue-Flv-Player/" class="nav-link">
  FLV 播放器
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Calendar/" class="nav-link">
  Calendar 农历面板
</a></li><li class="dropdown-item"><!----> <a href="/plugin/Very-Axios/" class="nav-link">
  Very-Axios
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="utils Menu" class="dropdown-title"><span class="title">函数库</span> <span class="arrow down"></span></button> <button type="button" aria-label="utils Menu" class="mobile-dropdown-title"><span class="title">函数库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/utils/Type/" class="nav-link">
  类型判断类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Validator/" class="nav-link">
  常规验证类
</a></li><li class="dropdown-item"><!----> <a href="/utils/String/" class="nav-link">
  字符串类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Array/" class="nav-link">
  数组类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Number/" class="nav-link">
  数字类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Money/" class="nav-link">
  金额类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Date/" class="nav-link">
  日期类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Calculate/" class="nav-link">
  浮点计算类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Tools/" class="nav-link">
  工具类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Storage/" class="nav-link">
  存储类
</a></li><li class="dropdown-item"><!----> <a href="/utils/DOM/" class="nav-link">
  DOM类
</a></li><li class="dropdown-item"><!----> <a href="/utils/Event/" class="nav-link">
  事件处理类
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="tools Menu" class="dropdown-title"><span class="title">工具</span> <span class="arrow down"></span></button> <button type="button" aria-label="tools Menu" class="mobile-dropdown-title"><span class="title">工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tools/NodeJS/" class="nav-link">
  NodeJS
</a></li><li class="dropdown-item"><!----> <a href="/tools/Sourcetree/" class="nav-link">
  Sourcetree
</a></li><li class="dropdown-item"><!----> <a href="/tools/VisualStudioCode/" class="nav-link">
  VSCode
</a></li><li class="dropdown-item"><!----> <a href="/tools/XShell/" class="nav-link">
  XShell
</a></li><li class="dropdown-item"><!----> <a href="/tools/Typora/" class="nav-link">
  Typora
</a></li><li class="dropdown-item"><!----> <a href="/tools/PicGo/" class="nav-link">
  PicGo
</a></li><li class="dropdown-item"><!----> <a href="/tools/XMind/" class="nav-link">
  XMind
</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>函数库</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/utils/" aria-current="page" class="active sidebar-link">Cafe-Utils</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/utils/#使用" class="sidebar-link">使用</a></li><li class="sidebar-sub-header"><a href="/utils/#jest功能覆盖" class="sidebar-link">Jest功能覆盖</a></li><li class="sidebar-sub-header"><a href="/utils/#更新记录" class="sidebar-link">更新记录</a></li></ul></li><li><a href="/utils/Type.html" class="sidebar-link">类型判断类</a></li><li><a href="/utils/Validator.html" class="sidebar-link">常规验证类</a></li><li><a href="/utils/String.html" class="sidebar-link">字符串类</a></li><li><a href="/utils/Array.html" class="sidebar-link">数组类</a></li><li><a href="/utils/Number.html" class="sidebar-link">数字类</a></li><li><a href="/utils/Money.html" class="sidebar-link">金额类</a></li><li><a href="/utils/Date.html" class="sidebar-link">日期类</a></li><li><a href="/utils/Calculate.html" class="sidebar-link">浮点计算类</a></li><li><a href="/utils/Tools.html" class="sidebar-link">工具类</a></li><li><a href="/utils/Storage.html" class="sidebar-link">存储类</a></li><li><a href="/utils/DOM.html" class="sidebar-link">DOM类</a></li><li><a href="/utils/Event.html" class="sidebar-link">事件处理类</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="cafe-utils"><a href="#cafe-utils" class="header-anchor">#</a> Cafe-Utils</h1> <p><img src="https://img.shields.io/npm/v/cafe-utils.svg" alt="NPM version"></p> <p><code>cafe-utils</code>  是对常用函数的封装，方便在实际项目中使用，主要内容包含：类型判断、表单验证、字符串类、数字类、金额类、日期类、浮点计算类、工具类、存储类、DOM 类操作、事件处理相关函数等内容。</p> <h2 id="使用"><a href="#使用" class="header-anchor">#</a> 使用</h2> <h3 id="npm-安装"><a href="#npm-安装" class="header-anchor">#</a> npm 安装</h3> <div class="language-shell extra-class"><pre class="language-shell"><code><span class="token function">npm</span> i cafe-utils
</code></pre></div><p>使用：</p> <div class="language-shell extra-class"><pre class="language-shell"><code>// 单独引用
<span class="token function">import</span> <span class="token punctuation">{</span> uuid <span class="token punctuation">}</span> from <span class="token string">'cafe-utils'</span><span class="token punctuation">;</span>
uuid<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

// 整体引用
<span class="token function">import</span> * as cafeUtils from <span class="token string">'cafe-utils'</span><span class="token punctuation">;</span>
cafeUtils.uuid<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h3 id="cdn"><a href="#cdn" class="header-anchor">#</a> CDN</h3> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>https://unpkg.com/cafe-utils/lib/utils.umd.min.js<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
<span class="token comment">&lt;!-- 或者 --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>https://cdn.jsdelivr.net/npm/cafe-utils/lib/utils.umd.min.js<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>使用：</p> <div class="language-js extra-class"><pre class="language-js"><code>cafeUtils<span class="token punctuation">.</span><span class="token function">uuid</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
</code></pre></div><h2 id="jest功能覆盖"><a href="#jest功能覆盖" class="header-anchor">#</a> Jest 功能覆盖</h2> <table><thead><tr><th>File</th> <th>% Stmts</th> <th>% Branch</th> <th>% Funcs</th> <th>% Lines</th> <th>Uncovered Line #s</th></tr></thead> <tbody><tr><td>All files</td> <td>94.88</td> <td>83.33</td> <td>88.17</td> <td>94.12</td> <td></td></tr> <tr><td>depend</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>numToString.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>modules</td> <td>94.86</td> <td>83.2</td> <td>88.11</td> <td>94.08</td> <td></td></tr> <tr><td>array.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>cookies.ts</td> <td>100</td> <td>80</td> <td>100</td> <td>100</td> <td>46-57</td></tr> <tr><td>date.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>dom.ts</td> <td>40</td> <td>0</td> <td>0</td> <td>28.57</td> <td>15-17,27,37-39,50-53</td></tr> <tr><td>event.ts</td> <td>30.77</td> <td>7.69</td> <td>22.22</td> <td>28</td> <td>16-27,42-49,64-71</td></tr> <tr><td>floatCalculate.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>index.ts</td> <td>100</td> <td>100</td> <td>86.25</td> <td>100</td> <td></td></tr> <tr><td>money.ts</td> <td>98.51</td> <td>94.59</td> <td>100</td> <td>98.36</td> <td>115</td></tr> <tr><td>number.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>storage.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>string.ts</td> <td>100</td> <td>94.29</td> <td>100</td> <td>100</td> <td>71-90</td></tr> <tr><td>tools.ts</td> <td>100</td> <td>97.5</td> <td>100</td> <td>100</td> <td>90</td></tr> <tr><td>type.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr> <tr><td>validator.ts</td> <td>100</td> <td>100</td> <td>100</td> <td>100</td> <td></td></tr></tbody></table> <h2 id="更新记录"><a href="#更新记录" class="header-anchor">#</a> 更新记录</h2> <ul><li><p>2020-12-18 <strong>1.0.24</strong>：</p> <ul><li>优化  <code>camelCase</code>  为   <code>toCamelCase</code> ；</li> <li>优化  <code>kebabCase</code>  为   <code>fromCamelCase</code> ；</li> <li>优化  <code>replaceHTMLTags</code>  为  <code>escapeHTML</code> ；</li> <li>新增  <code>unescapeHTML</code> 、 <code>randomIntegerInRange</code> 、 <code>randomNumberInRange</code> 、 <code>initArrayFillValues</code> 、 <code>sample</code> ；</li></ul></li> <li><p>2020-12-17 <strong>1.0.23</strong>：</p> <ul><li>新增  <code>stripHTMLTags</code> ；</li> <li>修改  <code>filterTag</code>  为  <code>replaceHTMLTags</code> ；</li></ul></li> <li><p>2020-12-17 <strong>1.0.22</strong>：</p> <ul><li>优化代码；</li></ul></li> <li><p>2020-12-17 <strong>1.0.21</strong>：</p> <ul><li>重构  <code>deepClone</code> ；</li> <li>优化代码；</li></ul></li> <li><p>2020-12-17 <strong>1.0.21</strong>：</p> <ul><li>修复  <code>divExact</code> ；</li> <li>优化  <code>uuid</code> ；</li> <li>增加  <code>dayName</code> 、 <code>getTimestamp</code> 、 <code>fromTimestamp</code></li></ul></li> <li><p>2020-12-16 <strong>1.0.20</strong>：</p> <ul><li>优化代码</li></ul></li> <li><p>2020-12-16 <strong>1.0.19</strong>：</p> <ul><li>增加  <code>isWeekend</code> 、 <code>isWeekday</code> 、 <code>arrayMax</code> 、 <code>arrayMin</code> 、 <code>arrayChunk</code> 、 <code>flatten</code> 、 <code>deepFlatten</code> 、 <code>union</code> 、 <code>intersection</code> 、 <code>difference</code></li></ul></li> <li><p>2020-12-15 <strong>1.0.18</strong>：</p> <ul><li>修改  <code>formatNum</code>  为  <code>formatStr</code></li> <li>修复 bug</li></ul></li> <li><p>2020-12-14 <strong>1.0.17</strong>：</p> <ul><li>修复 bug</li></ul></li> <li><p>2020-12-14 <strong>1.0.16</strong>：</p> <ul><li>增加  <code>isPhone</code> 、 <code>isTel</code> 、 <code>isZIPCode</code> 、 <code>isEmail</code> 、 <code>isIDCard</code> 、 <code>isURL</code> 、 <code>isImg</code> 、 <code>isCar</code> 、 <code>isIPV4</code> 、 <code>isIPV6</code></li></ul></li> <li><p>2020-12-14 <strong>1.0.15</strong>：</p> <ul><li>增加  <code>clearCookie</code></li> <li>优化命名  <code>addExact</code> 、 <code>subExact</code> 、 <code>mulExact</code> 、 <code>divExact</code> 、 <code>setLStorage</code> 、 <code>getLStorage</code> 、 <code>delLStorage</code> 、 <code>clearLStorage</code> 、 <code>setSStorage</code> 、 <code>getSStorage</code> 、 <code>delSStorage</code> 、 <code>clearSStorage</code></li></ul></li> <li><p>2020-12-12 <strong>1.0.14</strong>：</p> <ul><li>增加  <code>isObject</code> 、 <code>isArray</code> 、 <code>isDate</code> 、 <code>isNumber</code> 、 <code>isString</code> 、 <code>isBoolean</code> 、 <code>isFunction</code> 、 <code>isNull</code></li></ul></li> <li><p>2020-12-12 <strong>1.0.13</strong>：</p> <ul><li>修改  <code>guid</code>  为  <code>randomId</code></li> <li>增加  <code>uuid</code></li> <li>删除  <code>openDB</code> 、 <code>addData</code> 、 <code>getDataByKey</code> 、 <code>cursorGetData</code> 、 <code>getDataByIndex</code> 、 <code>cursorGetDataByIndex</code> 、 <code>updateDB</code> 、 <code>deleteDB</code> 、 <code>cursorDelete</code> 、 <code>closeDB</code> 、 <code>deleteDBAll</code></li></ul></li> <li><p>2020-12-12 <strong>1.0.12</strong>：</p> <ul><li>增加  <code>setLocalStorage</code> 、 <code>getLocalStorage</code> 、 <code>delLocalStorage</code> 、 <code>clearLocalStorage</code> 、 <code>setSessionStorage</code> 、 <code>delSessionStorage</code> 、 <code>clearSessionStorage</code> 、 <code>openDB</code> 、 <code>addData</code> 、 <code>getDataByKey</code> 、 <code>cursorGetData</code> 、 <code>getDataByIndex</code> 、 <code>cursorGetDataByIndex</code> 、 <code>updateDB</code> 、 <code>deleteDB</code> 、 <code>cursorDelete</code> 、 <code>closeDB</code> 、 <code>deleteDBAll</code> 、 <code>listener</code> 、 <code>on</code> 、 <code>off</code></li></ul></li> <li><p>2020-12-11 <strong>1.0.11</strong>：</p> <ul><li>修复 bug</li></ul></li> <li><p>2020-12-11 <strong>1.0.10</strong>：</p> <ul><li>增加  <code>toggleClass</code> 、 <code>convertMoney</code></li></ul></li> <li><p>2020-12-10 <strong>1.0.9</strong>：</p> <ul><li>优化代码结构</li> <li>增加  <code>getCookie</code> 、 <code>setCookie</code> 、 <code>delCookie</code> 、 <code>hasClass</code> 、 <code>addClass</code> 、 <code>removeClass</code></li></ul></li> <li><p>2020-12-10 <strong>1.0.8</strong>：</p> <ul><li>优化浮点精度计算</li></ul></li> <li><p>2020-12-09 <strong>1.0.7</strong>：</p> <ul><li>增加  <code>addExact</code> 、 <code>subtractExact</code> 、 <code>multiplyExact</code> 、 <code>divisionExact</code></li></ul></li> <li><p>2020-12-09 <strong>1.0.6</strong>：</p> <ul><li>增加单元测试</li></ul></li> <li><p>2020-12-09 <strong>1.0.5</strong>：</p> <ul><li>增加  <code>getGbLen</code> 、 <code>subGbString</code> 、 <code>formatMoney</code> 、 <code>formatNum</code> 、 <code>toFixed</code></li></ul></li> <li><p>2020-12-09 <strong>1.0.4</strong>：</p> <ul><li>增加  <code>trim</code> 、 <code>guid</code> 、 <code>camelCase</code> 、 <code>filterTag</code> 、 <code>changeCase</code></li></ul></li> <li><p>2020-12-08 <strong>1.0.3</strong>：</p> <ul><li>重构，优化代码</li></ul></li> <li><p>2020-12-08 <strong>1.0.2</strong> ：</p> <ul><li>增加  <code>clone</code> 、 <code>cloneDeep</code> 、 <code>debounce</code> 、 <code>throttle</code></li></ul></li> <li><p>2020-12-08 <strong>1.0.0</strong></p></li></ul></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">文档更新时间:</span> <span class="time">2021-06-10 17:57:34</span></div></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/utils/Type.html">
        类型判断类
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"><!----><!----></div></div>
    <script src="/assets/js/app.7f089e4c.js" defer></script><script src="/assets/js/2.9f5e73e8.js" defer></script><script src="/assets/js/3.2a47c23c.js" defer></script><script src="/assets/js/45.594b749a.js" defer></script>
  </body>
</html>
